//
//  MyMessageCell.m
//  GuoBang
//
//  Created by 梧桐树 on 16/4/29.
//  Copyright © 2016年 梧桐树. All rights reserved.
//

#import "MyMessageCell.h"

@implementation MyMessageCell

- (void)awakeFromNib {
    [super awakeFromNib];
    

}
//用户说的话
-(void)loadCell{
    MessageShowView *message=[MessageShowView new];
    message.introStr=self.messageStr;

    [message loadMessage];
    message.backgroundColor=[SEATools stringToColor:@"b0dcf8"];
    message.frame=CGRectMake(WIDTH-message.frame.size.width-10, 7, message.frame.size.width, message.frame.size.height);
    [self addSubview:message];
    self.backgroundColor=[SEATools stringToColor:@"EFEFF4"];
    self.frame=CGRectMake(self.frame.origin.x, self.frame.origin.y, WIDTH, message.frame.size.height+14);

}
//客服说的话
-(void)loadServiceCell{

    MessageShowView *message=[MessageShowView new];
    message.introStr=self.messageStr;
    
    [message loadMessage];
    message.backgroundColor=[UIColor whiteColor];
    message.frame=CGRectMake(10, 7, message.frame.size.width, message.frame.size.height);
    [self addSubview:message];
    self.backgroundColor=[SEATools stringToColor:@"EFEFF4"];
    self.frame=CGRectMake(self.frame.origin.x, self.frame.origin.y, WIDTH, message.frame.size.height+14);
}
-(void)loadPhoto{

    MessageShowView *message=[MessageShowView new];
    message.introStr=self.messageStr;
    message.delegate=self;
    [message loadPhoto];
    message.backgroundColor=[SEATools stringToColor:@"b0dcf8"];
    message.frame=CGRectMake(WIDTH-message.frame.size.width-10, 7, message.frame.size.width, message.frame.size.height);
    [self addSubview:message];
    self.backgroundColor=[SEATools stringToColor:@"EFEFF4"];
    self.frame=CGRectMake(self.frame.origin.x, self.frame.origin.y, WIDTH, message.frame.size.height+14);

}
-(void)photoMore:(UIImage *)image{
    [self.delegate showMePhoto:image];

}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
